<!-- 配置项名称 -->
<b style="display: block; padding-bottom: 10px;border-bottom: 1px solid #eee">
  <span title="{{config.tips}}" data-toggle="tooltip" data-placement="right">{{config.label}}</span>
  <span class="text-danger" style="float: right;" ng-show="config.required&&config.type!='radio'&&config.type!='checkbox'">
    {{config.type=='text'?'文本':'数字'}}
    <span style="font-size: 18px;line-height: 18px;">&lowast;</span>
  </span>
  </span>
</b>
<!-- 单选类型 -->
<div ng-if="config.type=='radio'">
  <label class="radio-inline" ng-if="config.appList.length==0" style="margin-right: 20px;margin-top:10px;" ng-repeat="radio in config.radioGroup">
    <input type="radio" ng-value="radio.value" ng-model="config.value" ng-change="changeRadio()"> {{radio.label}}
  </label>
  <div class="list-group-item form-horizontal" style="padding: 0;border: 0;margin-bottom: -15px;margin-top:3px;" ng-if="config.appList.length>0">
    <div class="form-group" ng-repeat="app in config.appList">
      <label class="col-md-2 control-label" style="padding-right: 0" ng-show="config.apps.indexOf(',')>-1">{{app.name}}</label>
      <div ng-class="config.apps.indexOf(',')>-1?'col-md-10':'col-md-12'">
        <label class="radio-inline" style="margin-right: 20px;" ng-repeat="radio in config.radioGroup">
          <input type="radio" ng-value="radio.value" ng-model="app.value" ng-change="changeRadio()"> {{radio.label}}
        </label>
      </div>
    </div>
  </div>
</div>
<!-- 文本框类型 -->
<div ng-if="config.type=='text'" style="margin-top:10px;">
  <div ng-class="config.isNull?'has-error':''" ng-if="config.appList.length==0">
    <input type="text" class="form-control" ng-model="config.value" ng-change="blur(config,config.required)" style="font-family: monospace">
    <b class="help-block" ng-show="config.isNull">{{config.label}}不能为空</b>
  </div>

  <div class="list-group-item form-horizontal" style="padding: 0;border: 0;margin-bottom: -15px;" ng-if="config.appList.length>0">
    <div class="form-group" ng-repeat="app in config.appList">
      <label class="col-md-2 control-label" style="padding-right: 0" ng-show="config.apps.indexOf(',')>-1">{{app.name}}</label>
      <div ng-class="config.apps.indexOf(',')>-1&&app.isNull?'col-md-10 has-error':config.apps.indexOf(',')==-1&&app.isNull?'col-md-12 has-error':config.apps.indexOf(',')>-1&&!app.isNull?'col-md-10':'col-md-12'">
        <input type="text" class="form-control" ng-model="app.value" ng-change="blur(app,config.required)" style="font-family: monospace">
        <b class="help-block" ng-show="app.isNull">{{app.name}}不能为空</b>
      </div>
    </div>
  </div>

</div>
<!-- number类型 -->
<div ng-if="config.type=='number'" style="margin-top:10px;">
  <div ng-class="config.isNull?'has-error':''" ng-if="config.appList.length==0">
    <input type="text" class="form-control" ng-model="config.value" ng-change="blur(config,config.required,true)" style="font-family: monospace">
    <b class="help-block" ng-show="config.isNull">{{config.label}}不能为空</b>
  </div>

  <div class="list-group-item form-horizontal" style="padding: 0;border: 0;margin-bottom: -15px;" ng-if="config.appList.length>0">
    <div class="form-group" ng-repeat="app in config.appList">
      <label class="col-md-2 control-label" style="padding-right: 0" ng-show="config.apps.indexOf(',')>-1">{{app.name}}</label>
      <div ng-class="config.apps.indexOf(',')>-1&&app.isNull?'col-md-10 has-error':config.apps.indexOf(',')==-1&&app.isNull?'col-md-12 has-error':config.apps.indexOf(',')>-1&&!app.isNull?'col-md-10':'col-md-12'">
        <input type="text" class="form-control" ng-model="app.value" ng-change="blur(app,config.required,true)" style="font-family: monospace">
        <b class="help-block" ng-show="app.isNull">{{app.name}}不能为空</b>
      </div>
    </div>
  </div>

</div>
<!-- 多选类型 -->
<div ng-if="config.type=='checkbox'" style="margin-top:10px;">
  <label class="radio-inline" ng-if="config.appList.length==0" style="margin-right: 20px;margin-top:10px;" ng-repeat="box in config.boxGroup">
    <input type="checkbox" ng-model="box.value" ng-change="changeRadio()"> {{box.label}}
  </label>
</div>